
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>二十三个设计模式 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-sidebar-style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-theme-comscore/test.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="工厂模式.html" />
    
    
    <link rel="prev" href="单元测试.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    前言
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">基础篇</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../java基础/IO流基础.html">
            
                <a href="../java基础/IO流基础.html">
            
                    
                    IO流基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="../java基础/集合.html">
            
                <a href="../java基础/集合.html">
            
                    
                    集合
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="../java基础/异常处理.html">
            
                <a href="../java基础/异常处理.html">
            
                    
                    异常处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="../java基础/线程.html">
            
                <a href="../java基础/线程.html">
            
                    
                    线程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="../java基础/网络编程.html">
            
                <a href="../java基础/网络编程.html">
            
                    
                    网络编程
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">进阶篇</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="MySQL.html">
            
                <a href="MySQL.html">
            
                    
                    MySQL
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="Oracle.html">
            
                <a href="Oracle.html">
            
                    
                    Oracle
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="Redis.html">
            
                <a href="Redis.html">
            
                    
                    Redis
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="Netty.html">
            
                <a href="Netty.html">
            
                    
                    Netty
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="Spring.html">
            
                <a href="Spring.html">
            
                    
                    Spring
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="SpringMVC.html">
            
                <a href="SpringMVC.html">
            
                    
                    SpringMVC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="单元测试.html">
            
                <a href="单元测试.html">
            
                    
                    SpringBoot单元测试
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="3.8" data-path="设计模式.html">
            
                <a href="设计模式.html">
            
                    
                    二十三个设计模式
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.8.1" data-path="工厂模式.html">
            
                <a href="工厂模式.html">
            
                    
                    工厂模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.2" data-path="单例模式.html">
            
                <a href="单例模式.html">
            
                    
                    单例模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.3" data-path="建造者模式.html">
            
                <a href="建造者模式.html">
            
                    
                    建造者模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.4" data-path="原型模式.html">
            
                <a href="原型模式.html">
            
                    
                    原型模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.5" data-path="适配器模式.html">
            
                <a href="适配器模式.html">
            
                    
                    适配器模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.6" data-path="责任链模式.html">
            
                <a href="责任链模式.html">
            
                    
                    责任链模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.7" data-path="桥接模式.html">
            
                <a href="桥接模式.html">
            
                    
                    桥接模式
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">高级篇</li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="../springcloud/1.cloud架构选型.html">
            
                <a href="../springcloud/1.cloud架构选型.html">
            
                    
                    Spring Cloud
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1.1" data-path="../springcloud/2.Provider-支付模块.html">
            
                <a href="../springcloud/2.Provider-支付模块.html">
            
                    
                    Provider-支付模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.2" data-path="../springcloud/3.Consumer-订单模块.html">
            
                <a href="../springcloud/3.Consumer-订单模块.html">
            
                    
                    Consumer-订单模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.3" data-path="../springcloud/4.重构-Common模块.html">
            
                <a href="../springcloud/4.重构-Common模块.html">
            
                    
                    重构-Common模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.4" data-path="../springcloud/5.注册中心-Enreka.html">
            
                <a href="../springcloud/5.注册中心-Enreka.html">
            
                    
                    注册中心-Enreka
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.5" data-path="../springcloud/6.负载均衡-@LoadBalance.html">
            
                <a href="../springcloud/6.负载均衡-@LoadBalance.html">
            
                    
                    负载均衡-@LoadBalance
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.6" data-path="../springcloud/7.更换注册中心-Zookeeper.html">
            
                <a href="../springcloud/7.更换注册中心-Zookeeper.html">
            
                    
                    更换注册中心-Zookeeper
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.7" data-path="../springcloud/8.更换注册中心-Consul.html">
            
                <a href="../springcloud/8.更换注册中心-Consul.html">
            
                    
                    更换注册中心-Consul
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.8" data-path="../springcloud/9.负载均衡-Ribbon.html">
            
                <a href="../springcloud/9.负载均衡-Ribbon.html">
            
                    
                    负载均衡-Ribbon
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.9" data-path="../springcloud/10.服务调用-OpenFeign.html">
            
                <a href="../springcloud/10.服务调用-OpenFeign.html">
            
                    
                    服务调用-OpenFeign
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.10" data-path="../springcloud/11.熔断器-Hystrix.html">
            
                <a href="../springcloud/11.熔断器-Hystrix.html">
            
                    
                    熔断器-Hystrix
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.11" data-path="../springcloud/12.网关-Gateway.html">
            
                <a href="../springcloud/12.网关-Gateway.html">
            
                    
                    网关-Gateway
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.12" data-path="../springcloud/13.配置中心-Config.html">
            
                <a href="../springcloud/13.配置中心-Config.html">
            
                    
                    配置中心-Config
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.13" data-path="../springcloud/14.消息总线-bus.html">
            
                <a href="../springcloud/14.消息总线-bus.html">
            
                    
                    消息总线-Bus
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.14" data-path="../springcloud/15.消息驱动-stream.html">
            
                <a href="../springcloud/15.消息驱动-stream.html">
            
                    
                    消息驱动-Stream
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.15" data-path="../springcloud/16.链路监控-Sleuth.html">
            
                <a href="../springcloud/16.链路监控-Sleuth.html">
            
                    
                    链路监控-Sleuth
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.16" data-path="../springcloud/17.注册中心&配置中心-nacos.html">
            
                <a href="../springcloud/17.注册中心&配置中心-nacos.html">
            
                    
                    注册中心&配置中心-nacos
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.17" data-path="../springcloud/18.限流-sentinel.html">
            
                <a href="../springcloud/18.限流-sentinel.html">
            
                    
                    限流-sentinel
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="../java高级/JUC.html">
            
                <a href="../java高级/JUC.html">
            
                    
                    神秘的JUC包
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="../java高级/Docker.html">
            
                <a href="../java高级/Docker.html">
            
                    
                    Docker
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="../java高级/布隆过滤器.html">
            
                <a href="../java高级/布隆过滤器.html">
            
                    
                    布隆过滤器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="../java高级/Redission.html">
            
                <a href="../java高级/Redission.html">
            
                    
                    Redission
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="../java高级/MQ.html">
            
                <a href="../java高级/MQ.html">
            
                    
                    消息队列
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.7" data-path="../java高级/JVM.html">
            
                <a href="../java高级/JVM.html">
            
                    
                    JVM
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.8" data-path="../java书籍/《Effective Java》读书笔记.html">
            
                <a href="../java书籍/《Effective Java》读书笔记.html">
            
                    
                    《Effective Java》读书笔记 
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.8.1" data-path="../java书籍/创建和销毁对象.html">
            
                <a href="../java书籍/创建和销毁对象.html">
            
                    
                    创建和销毁对象
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">番外篇</li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="../java面试/面试题.html">
            
                <a href="../java面试/面试题.html">
            
                    
                    面试题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="../番外篇/小程序.html">
            
                <a href="../番外篇/小程序.html">
            
                    
                    微信小程序
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >二十三个设计模式</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="&#x8BBE;&#x8BA1;&#x6A21;&#x5F0F;&#x7C7B;&#x578B;"><a name="&#x8BBE;&#x8BA1;&#x6A21;&#x5F0F;&#x7C7B;&#x578B;" class="plugin-anchor" href="#&#x8BBE;&#x8BA1;&#x6A21;&#x5F0F;&#x7C7B;&#x578B;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x8BBE;&#x8BA1;&#x6A21;&#x5F0F;&#x7C7B;&#x578B;</h2>
<table>
<thead>
<tr>
<th>&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x6A21;&#x5F0F;</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>&#x521B;&#x5EFA;&#x578B;&#x6A21;&#x5F0F;</strong><br>&#x8FD9;&#x4E9B;&#x8BBE;&#x8BA1;&#x6A21;&#x5F0F;&#x63D0;&#x4F9B;&#x4E86;&#x4E00;&#x79CD;&#x5728;&#x521B;&#x5EFA;&#x5BF9;&#x8C61;&#x7684;&#x540C;&#x65F6;&#x9690;&#x85CF;&#x521B;&#x5EFA;&#x903B;&#x8F91;&#x7684;&#x65B9;&#x5F0F;&#xFF0C;&#x800C;&#x4E0D;&#x662F;&#x4F7F;&#x7528; new &#x8FD0;&#x7B97;&#x7B26;&#x76F4;&#x63A5;&#x5B9E;&#x4F8B;&#x5316;&#x5BF9;&#x8C61;&#x3002;<br>&#x8FD9;&#x4F7F;&#x5F97;&#x7A0B;&#x5E8F;&#x5728;&#x5224;&#x65AD;&#x9488;&#x5BF9;&#x67D0;&#x4E2A;&#x7ED9;&#x5B9A;&#x5B9E;&#x4F8B;&#x9700;&#x8981;&#x521B;&#x5EFA;&#x54EA;&#x4E9B;&#x5BF9;&#x8C61;&#x65F6;&#x66F4;&#x52A0;&#x7075;&#x6D3B;&#x3002;<br>&#x521B;&#x5EFA;&#x578B;&#x6A21;&#x5F0F;&#x5728;&#x521B;&#x5EFA;&#x4EC0;&#x4E48;(What)&#xFF0C;&#x7531;&#x8C01;&#x521B;&#x5EFA;(Who)&#xFF0C;&#x4F55;&#x65F6;&#x521B;&#x5EFA;(When)&#x7B49;&#x65B9;&#x9762;&#x90FD;&#x4E3A;&#x8F6F;&#x4EF6;&#x8BBE;&#x8BA1;&#x8005;&#x63D0;&#x4F9B;&#x4E86;&#x5C3D;&#x53EF;&#x80FD;&#x5927;&#x7684;&#x7075;&#x6D3B;&#x6027;&#x3002;</td>
<td style="text-align:left">&#x5DE5;&#x5382;&#x6A21;&#x5F0F;&#xFF08;Factory Pattern&#xFF09; <br>&#x62BD;&#x8C61;&#x5DE5;&#x5382;&#x6A21;&#x5F0F;&#xFF08;Abstract Factory Pattern&#xFF09; <br>&#x5355;&#x4F8B;&#x6A21;&#x5F0F;&#xFF08;Singleton Pattern&#xFF09; <br>&#x5EFA;&#x9020;&#x8005;&#x6A21;&#x5F0F;&#xFF08;Builder Pattern&#xFF09; <br>&#x539F;&#x578B;&#x6A21;&#x5F0F;&#xFF08;Prototype Pattern&#xFF09;</td>
</tr>
<tr>
<td><strong>&#x7ED3;&#x6784;&#x578B;&#x6A21;&#x5F0F;</strong><br>&#x8FD9;&#x4E9B;&#x8BBE;&#x8BA1;&#x6A21;&#x5F0F;&#x5173;&#x6CE8;&#x7C7B;&#x548C;&#x5BF9;&#x8C61;&#x7684;&#x7EC4;&#x5408;&#x3002;<br>&#x7EE7;&#x627F;&#x7684;&#x6982;&#x5FF5;&#x88AB;&#x7528;&#x6765;&#x7EC4;&#x5408;&#x63A5;&#x53E3;&#x548C;&#x5B9A;&#x4E49;&#x7EC4;&#x5408;&#x5BF9;&#x8C61;&#x83B7;&#x5F97;&#x65B0;&#x529F;&#x80FD;&#x7684;&#x65B9;&#x5F0F;&#x3002;</td>
<td style="text-align:left">&#x9002;&#x914D;&#x5668;&#x6A21;&#x5F0F;&#xFF08;Adapter Pattern&#xFF09; <br>&#x6865;&#x63A5;&#x6A21;&#x5F0F;&#xFF08;Bridge Pattern&#xFF09; <br>&#x8FC7;&#x6EE4;&#x5668;&#x6A21;&#x5F0F;&#xFF08;Filter&#x3001;Criteria Pattern&#xFF09;<br> &#x7EC4;&#x5408;&#x6A21;&#x5F0F;&#xFF08;Composite Pattern&#xFF09;<br> &#x88C5;&#x9970;&#x5668;&#x6A21;&#x5F0F;&#xFF08;Decorator Pattern&#xFF09; <br>&#x5916;&#x89C2;&#x6A21;&#x5F0F;&#xFF08;Facade Pattern&#xFF09; <br>&#x4EAB;&#x5143;&#x6A21;&#x5F0F;&#xFF08;Flyweight Pattern&#xFF09; <br>&#x4EE3;&#x7406;&#x6A21;&#x5F0F;&#xFF08;Proxy Pattern&#xFF09;</td>
</tr>
<tr>
<td><strong>&#x884C;&#x4E3A;&#x578B;&#x6A21;&#x5F0F;</strong><br>&#x8FD9;&#x4E9B;&#x8BBE;&#x8BA1;&#x6A21;&#x5F0F;&#x7279;&#x522B;&#x5173;&#x6CE8;&#x5BF9;&#x8C61;&#x4E4B;&#x95F4;&#x7684;&#x901A;&#x4FE1;&#x3002;</td>
<td style="text-align:left">&#x8D23;&#x4EFB;&#x94FE;&#x6A21;&#x5F0F;&#xFF08;Chain of Responsibility Pattern&#xFF09;<br> &#x547D;&#x4EE4;&#x6A21;&#x5F0F;&#xFF08;Command Pattern&#xFF09; <br>&#x89E3;&#x91CA;&#x5668;&#x6A21;&#x5F0F;&#xFF08;Interpreter Pattern&#xFF09;<br> &#x8FED;&#x4EE3;&#x5668;&#x6A21;&#x5F0F;&#xFF08;Iterator Pattern&#xFF09; <br>&#x4E2D;&#x4ECB;&#x8005;&#x6A21;&#x5F0F;&#xFF08;Mediator Pattern&#xFF09;<br> &#x5907;&#x5FD8;&#x5F55;&#x6A21;&#x5F0F;&#xFF08;Memento Pattern&#xFF09; <br>&#x89C2;&#x5BDF;&#x8005;&#x6A21;&#x5F0F;&#xFF08;Observer Pattern&#xFF09; <br>&#x72B6;&#x6001;&#x6A21;&#x5F0F;&#xFF08;State Pattern&#xFF09; <br>&#x7A7A;&#x5BF9;&#x8C61;&#x6A21;&#x5F0F;&#xFF08;Null Object Pattern&#xFF09; <br>&#x7B56;&#x7565;&#x6A21;&#x5F0F;&#xFF08;Strategy Pattern&#xFF09;<br> &#x6A21;&#x677F;&#x6A21;&#x5F0F;&#xFF08;Template Pattern&#xFF09; <br>&#x8BBF;&#x95EE;&#x8005;&#x6A21;&#x5F0F;&#xFF08;Visitor Pattern&#xFF09;</td>
</tr>
<tr>
<td><strong>J2EE &#x6A21;&#x5F0F;</strong><br>&#x8FD9;&#x4E9B;&#x8BBE;&#x8BA1;&#x6A21;&#x5F0F;&#x7279;&#x522B;&#x5173;&#x6CE8;&#x8868;&#x793A;&#x5C42;&#x3002;&#x8FD9;&#x4E9B;&#x6A21;&#x5F0F;&#x662F;&#x7531; Sun Java Center &#x9274;&#x5B9A;&#x7684;&#x3002;</td>
<td style="text-align:left">MVC &#x6A21;&#x5F0F;&#xFF08;MVC Pattern&#xFF09;<br> &#x4E1A;&#x52A1;&#x4EE3;&#x8868;&#x6A21;&#x5F0F;&#xFF08;Business Delegate Pattern&#xFF09;<br> &#x7EC4;&#x5408;&#x5B9E;&#x4F53;&#x6A21;&#x5F0F;&#xFF08;Composite Entity Pattern&#xFF09; <br>&#x6570;&#x636E;&#x8BBF;&#x95EE;&#x5BF9;&#x8C61;&#x6A21;&#x5F0F;&#xFF08;Data Access Object Pattern&#xFF09; <br>&#x524D;&#x7AEF;&#x63A7;&#x5236;&#x5668;&#x6A21;&#x5F0F;&#xFF08;Front Controller Pattern&#xFF09; <br>&#x62E6;&#x622A;&#x8FC7;&#x6EE4;&#x5668;&#x6A21;&#x5F0F;&#xFF08;Intercepting Filter Pattern&#xFF09; <br>&#x670D;&#x52A1;&#x5B9A;&#x4F4D;&#x5668;&#x6A21;&#x5F0F;&#xFF08;Service Locator Pattern&#xFF09; <br>&#x4F20;&#x8F93;&#x5BF9;&#x8C61;&#x6A21;&#x5F0F;&#xFF08;Transfer Object Pattern&#xFF09;</td>
</tr>
</tbody>
</table>
<h2 id="&#x63D2;&#x64AD;&#xFF1A;uml&#x56FE;&#x4ECB;&#x7ECD;"><a name="&#x63D2;&#x64AD;&#xFF1A;uml&#x56FE;&#x4ECB;&#x7ECD;" class="plugin-anchor" href="#&#x63D2;&#x64AD;&#xFF1A;uml&#x56FE;&#x4ECB;&#x7ECD;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x63D2;&#x64AD;&#xFF1A;UML&#x56FE;&#x4ECB;&#x7ECD;</h2>
<ul>
<li><strong>&#x7C7B;</strong></li>
</ul>
<p><img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h3mso9sjdij20q206yq48.jpg" alt=""></p>
<p>&#x7C7B;&#x5206;&#x4E09;&#x5C42;&#xFF0C;&#x7B2C;&#x4E00;&#x5C42;&#x662F;&#x7C7B;&#x540D;&#xFF0C;&#x7B2C;&#x4E8C;&#x5C42;&#x662F;&#x5B57;&#x6BB5;/&#x5C5E;&#x6027;&#xFF0C;&#x7B2C;&#x4E09;&#x5C42;&#x662F;&#x65B9;&#x6CD5;&#x6216;&#x884C;&#x4E3A;&#x3002;&#x5728;&#x7C7B;&#x56FE;&#x4E2D; &#x201D;+&#x201C; &#x8868;&#x793A;public&#xFF0C;&#x201D;-&#x201C; &#x8868;&#x793A;private&#xFF0C;&#x201C;#&#x201D; &#x8868;&#x793A;protected &#x3002;</p>
<ul>
<li><strong>&#x63A5;&#x53E3;</strong></li>
</ul>
<p><img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h3mtgloo6fj20pq09owg6.jpg" alt=""></p>
<p>&#x4E0E;&#x7C7B;&#x533A;&#x522B;&#x662F;&#x6709;&#x300A;interface&#x300B;&#x7684;&#x6807;&#x8BC6;&#xFF0C;&#x7B2C;&#x4E00;&#x5C42;&#x662F;&#x63A5;&#x53E3;&#x540D;&#xFF0C;&#x7B2C;&#x4E8C;&#x5C42;&#x662F;&#x65B9;&#x6CD5;&#x3002;&#x8FD8;&#x6709;&#x4E00;&#x79CD;&#x8868;&#x793A;&#x65B9;&#x6CD5;&#x53EB;&#x201C;&#x68D2;&#x68D2;&#x7CD6;&#x8868;&#x793A;&#x6CD5;&#x201D;&#xFF0C;&#x5706;&#x5708;&#x65C1;&#x8FB9;&#x7684;&#x662F;&#x63A5;&#x53E3;&#x540D;&#xFF0C;&#x63A5;&#x53E3;&#x65B9;&#x6CD5;&#x5728;&#x5177;&#x4F53;&#x5B9E;&#x73B0;&#x7C7B;&#x7684;&#x7B2C;&#x4E8C;&#x5C42;&#x3002;</p>
<ul>
<li><p>&#x7EE7;&#x627F;&#x5173;&#x7CFB;</p>
<p>&#x901A;&#x8FC7;&#x7A7A;&#x4E09;&#x89D2;&#x5F62;+&#x5B9E;&#x7EBF;&#x8868;&#x793A;&#x7EE7;&#x627F;&#x5173;&#x7CFB;&#x3002;</p>
<p><img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h3nprmb85oj207k0baglr.jpg" alt=""></p>
</li>
<li><p>&#x5B9E;&#x73B0;&#x5173;&#x7CFB;</p>
<p>&#x901A;&#x8FC7;&#x7A7A;&#x4E09;&#x89D2;&#x5F62;+&#x865A;&#x7EBF;&#x8868;&#x793A;&#x5B9E;&#x73B0;&#x63A5;&#x53E3;&#x3002;&#x7A7A;&#x4E09;&#x89D2;&#x5F62;&#x6307;&#x5411;&#x7236;&#x63A5;&#x53E3;</p>
</li>
<li><p>&#x5173;&#x8054;&#x5173;&#x7CFB;</p>
<p>&#x7528;&#x4E8E;&#x4E00;&#x4E2A;&#x7C7B;&#x9700;&#x8981;&#x201C;&#x77E5;&#x9053;&#x201D;/&#x201C;&#x5173;&#x8054;&#x201D;&#x53E6;&#x4E00;&#x4E2A;&#x7C7B;&#x7684;&#x65F6;&#x5019;</p>
<p>&#x4F7F;&#x7528;&#x5B9E;&#x7EBF;&#x7BAD;&#x5934;(&#x4F7F;&#x7528;&#x753B;&#x56FE;&#x5DE5;&#x5177;&#x6709;&#x95EE;&#x9898;)</p>
<p><img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h3nq4eie2dj20kw03oaa8.jpg" alt=""></p>
</li>
<li><p>&#x805A;&#x5408;&#x5173;&#x7CFB;</p>
<p>&#x7528;&#x4E8E;&#x8868;&#x793A;&#x5F31;&#x2018;&#x62E5;&#x6709;&#x2019;&#x5173;&#x7CFB;&#xFF0C;&#x4F53;&#x73B0;&#x7684;&#x662F;A&#x5BF9;&#x8C61;&#x5305;&#x542B;B&#x5BF9;&#x8C61;&#xFF0C;&#x4F46;&#x662F;B&#x5BF9;&#x8C61;&#x4E0D;&#x5305;&#x542B;A&#x5BF9;&#x8C61;&#x3002;</p>
<p>&#x4F7F;&#x7528;&#x7A7A;&#x68F1;&#x5F62;+&#x5B9E;&#x7EBF;&#x7BAD;&#x5934;</p>
<p><img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h3nr61x572j20j60dqt98.jpg" alt=""></p>
</li>
</ul>
<ul>
<li><p>&#x7EC4;&#x5408;&#x5173;&#x7CFB;</p>
<p>&#x5F3A;&#x62E5;&#x6709;&#x5173;&#x7CFB;&#xFF0C;&#x4F53;&#x73B0;&#x4E86;&#x4E25;&#x683C;&#x7684;&#x6574;&#x4F53;&#x548C;&#x90E8;&#x5206;&#x5173;&#x7CFB;&#x3002;&#x7EC4;&#x5408;&#x5173;&#x7CFB;&#x4E2D;&#x94FE;&#x63A5;&#x7EBF;&#x4E0A;&#x8FD8;&#x6709;&#x201C;1&#x201D;&#x548C;&#x201C;2&#x201D;&#x7684;&#x6570;&#x5B57;&#xFF0C;&#x8868;&#x793A;n&#x4E2A;&#x5B9E;&#x4F8B;</p>
<p>&#x4F7F;&#x7528;&#x5B9E;&#x5FC3;&#x68F1;&#x5F62;+&#x5B9E;&#x7EBF;&#x7BAD;&#x5934;</p>
<p><img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h3nr83r0t3j20xa0cggmi.jpg" alt=""></p>
</li>
<li><p>&#x4F9D;&#x8D56;&#x5173;&#x7CFB;</p>
<p>&#x4F8B;&#x5982;&#xFF1A;&#x52A8;&#x7269;&#x4F9D;&#x8D56;&#x4E8E;&#x6C34;&#x3001;&#x98DF;&#x7269;&#x548C;&#x6C27;&#x6C14;</p>
<p>&#x4F7F;&#x7528;&#x865A;&#x7EBF;&#x7BAD;&#x5934;&#x8868;&#x793A;</p>
<p><img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h3nrf0pbyhj214o0lmjt4.jpg" alt=""></p>
</li>
</ul>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; mine 2022-2025 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2022-06-28 10:46:25
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="单元测试.html" class="navigation navigation-prev " aria-label="Previous page: SpringBoot单元测试">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="工厂模式.html" class="navigation navigation-next " aria-label="Next page: 工厂模式">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"二十三个设计模式","level":"3.8","depth":1,"next":{"title":"工厂模式","level":"3.8.1","depth":2,"path":"java进阶/工厂模式.md","ref":"java进阶/工厂模式.md","articles":[]},"previous":{"title":"SpringBoot单元测试","level":"3.7","depth":1,"path":"java进阶/单元测试.md","ref":"java进阶/单元测试.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["back-to-top-button","code","splitter","expandable-chapters-small","anchors","theme-comscore","tbfed-pagefooter","sidebar-style","pageview-count","popup"],"pluginsConfig":{"sidebar-style":{"author":"梁兴龙","title":"《Java 笔记本》"},"tbfed-pagefooter":{"copyright":"Copyright &copy mine 2022-2025","modify_label":"文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"splitter":{},"search":{},"popup":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"code":{"copyButtons":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-comscore":{},"back-to-top-button":{},"pageview-count":{},"expandable-chapters-small":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"java进阶/设计模式.md","mtime":"2022-06-28T02:46:25.139Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-08-22T03:22:22.085Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sidebar-style/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-theme-comscore/test.js"></script>
        
    

    </body>
</html>

